import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//  引入ant-design-vue
// import Antd from 'ant-design-vue';
// import 'ant-design-vue/dist/reset.css';

const app = createApp(App)

//@ts-ignore
import createLineNumbertPlugin from '@kangc/v-md-editor/lib/plugins/line-number/index';




import VueLazyload from 'vue3-lazy'

// 引入markdown
// @ts-ignore
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
// @ts-ignore
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';
// 支持复制功能
// @ts-ignore
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index';
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css';
// @ts-ignore
import createTipPlugin from '@kangc/v-md-editor/lib/plugins/tip/index';
import '@kangc/v-md-editor/lib/plugins/tip/tip.css';
// 使用表情
// @ts-ignore
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index';
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css';
// highlightjs
import hljs from 'highlight.js';


// @ts-ignore
import { align } from "@mdit/plugin-align";
// @ts-ignore
import { imgSize } from "@mdit/plugin-img-size";
// @ts-ignore
import { mark } from "@mdit/plugin-mark";
VMdPreview.use(githubTheme, {
    Hljs: hljs,
    extend(md:any) {
        md.use(align)
        md.use(imgSize)
        md.use(mark)
    }
});

VMdPreview.use(createCopyCodePlugin())
VMdPreview.use(createTipPlugin())
VMdPreview.use(createEmojiPlugin())
VMdPreview.use(createLineNumbertPlugin())


// 数字滚动组件
import CountTo  from 'vue3-count-to';


import {
    Button,
    Layout,
    Menu,
    message,
    Input,
    Space,
    Dropdown,
    Divider,
    Modal,
    Drawer,
    Row,
    Col,
    Select,
    Popconfirm,
    Pagination,
    Timeline,
    Collapse,
    Image,
    Skeleton,
    Tabs,
    Result
} from 'ant-design-vue'



app
    .use(Button)
    .use(Layout)
    .use(Menu)
    .use(Input)
    .use(Space)
    .use(Dropdown)
    .use(Divider)
    .use(Modal)
    .use(Drawer)
    .use(Row)
    .use(Col)
    .use(Select)
    .use(Popconfirm)
    .use(Pagination)
    .use(CountTo)
    .use(Collapse)
    .use(Timeline)
    .use(Image)
    .use(Skeleton)
    .use(Tabs)
    .use(Result)
    .use(VueLazyload,{
        loading:require('@/assets/images/loading.gif'),
        error:require('@/assets/images/error.jpg'),
    })
    .use(VMdPreview)
    .use(store)
    .use(router)
    .mount('#app')
